Ext.define('AmpleHarvest.objects.harvestMetadata.cMetaData',
		{
			extend			: 'Ext.grid.Panel',
			alias			: 'widget.ampleharvest-objects-harvestmetadata-cmetadata',
			title			: 'Harvest MetaData',
			requires			: [
			        		   'AmpleHarvest.util.dataBroker'
			        		   ],
	
			iconCls			: 'toolbar-article-data',
			collapsible		: true,
			border			: 0,
			height			: 180,
			
			columns			: [
			       			   { header : 'Name', dataIndex : 'name', flex : 1 },
			       			   { header : 'Value', dataIndex : 'value', flex : 1 },
			       			   ],
   			bubbleEvents	:
				[
					'doclassificationchange'
				],
			listeners		:
			{
				brokerResponse	: function(obj_response)
				{

					this.getStore().loadRawData(obj_response.data);
					this.ahCaller.fireEvent('objectResponse', this);
					this.fireEvent(
							AmpleHarvest.layout.cLayout.C_STR_EVENT_CLASSIFICATION_CHANGE,
							obj_response.classification
					);					
				}
			},

			initComponent	: function()
			{
				this.addEvents('brokerResponse');

				var obj_This = this;

				this.store = Ext.create('AmpleHarvest.DATA.Store.cDataMetrics');
				
				var util_db_dmetedata = Ext.create('AmpleHarvest.util.dataBroker');
				util_db_dmetedata.brokerData(this, this.m_str_id, 'cmetadata');				
				
				this.callParent();
			}
		});
